Skip to content

#36 - Fix to_device() incorrectly casting integer tensors#49

Open
Dpakkk wants to merge 1 commit intoNVlabs:mainfrom
Dpakkk:fix/to-device-integer-dtype
Open

#36 - Fix to_device() incorrectly casting integer tensors#49
Dpakkk wants to merge 1 commit intoNVlabs:mainfrom
Dpakkk:fix/to-device-integer-dtype

Conversation

@Dpakkk
Copy link
Copy Markdown
Contributor

@Dpakkk Dpakkk commented Feb 27, 2026

Only apply dtype conversion to floating-point tensors, preserving integer and boolean tensors for HuggingFace model compatibility.

@Dpakkk Dpakkk force-pushed the fix/to-device-integer-dtype branch from e780dab to 810dc8d Compare March 10, 2026 16:50
Only apply dtype conversion to floating-point tensors. Integer tensors
(e.g., input_ids, attention_mask) must preserve their dtype for
compatibility with Hugging Face models during mixed-precision inference.

Signed-off-by: Dpakkk <pokharelbikash981@gmail.com>
@Dpakkk Dpakkk force-pushed the fix/to-device-integer-dtype branch from 87e83d4 to 3ae0edc Compare March 10, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant